- 
                Notifications
    You must be signed in to change notification settings 
- Fork 27
added a new test prepare env for host test case #165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| - name: lock | ||
| command: "{{item}}" | ||
| with_items: | ||
| - echo "ProvisioningTemplate.update_all(locked: false)" | foreman-rake console | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty sure this will not work as pipe | is a shell construct that does not work with command task
|  | ||
| - name: lock | ||
| command: "{{item}}" | ||
| with_items: | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not 3 separate tasks? IMO it just makes the script harder to read
| with_items: | ||
| - echo "ProvisioningTemplate.update_all(locked: false)" | foreman-rake console | ||
| - hammer template build-pxe-default | ||
| - PROV_TEMPLATES="Kickstart default,Kickstart default finish,Kickstart default PXELinux,Kickstart default user data" | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting a bash variable in one task and using it in another does not work as these are two different environments
|  | ||
| - name: hammer architecture create | ||
| command: | ||
| hammer -u "{{ sat_user}}" -p "{{ sat_pass }}" os create --name "RHEL" --major 8 --minor 4 --description="RHEL 8.4" --media "RHEL mirror" --provisioning-templates "$PROV_TEMPLATES" --architectures "x86_64" --family Redhat --partition-tables "Kickstart default" | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we use that variable only on one place, so we do not need to define it at all
| command: | ||
| hammer -u "{{ sat_user}}" -p "{{ sat_pass }}" compute-resource create --provider "libvirt" --name "MyLibvirtComputeResource" --set-console-password "false" --url "qemu+ssh://[email protected]/system" --organizations "MyOrg" --locations "MyLoc" | ||
|  | ||
| # For testing we don't need to have them locked | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean by locking here?
71883ab    to
    2db3161      
    Compare
  
    0b4e005    to
    1427f03      
    Compare
  
    547eba9    to
    4e1cbe6      
    Compare
  
    619176d    to
    5d9a7b8      
    Compare
  
    f6ae7c2    to
    3e2d546      
    Compare
  
    Add cleanup tests to full.sh
No description provided.